# -*- encoding=utf8 -*-
__author__ = "chen"

from multiprocessing import Process
from common.common_util import *



def cangbaotu(idx):
    set_current(idx)
    for i in range(30):
        try:
            wait(Template(r"tpl1704676408682.png", record_pos=(0.111, 0.173), resolution=(1600, 900)),1200)
            touch(Template(r"tpl1704676416000.png", record_pos=(0.104, 0.175), resolution=(1600, 900)))
        except :
            print("未找到c")
if __name__ == '__main__':
    # part1:开多个进程,每个进程都有不同的pid
    n = devices()
    for i in range(n):
        p = Process(target=cangbaotu,args=(i,))
        p.start()
